package org.gavin.core.annotation;


import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import org.gavin.core.validator.ValuesValidator;

import java.lang.annotation.*;

/**
 * @author grl
 * @date 2022/4/8
 * Created by admin on 2022/4/8 12:37
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER,ElementType.FIELD})
@Constraint(validatedBy = ValuesValidator.class)
public @interface Values {

    String[] value();

    String message() default "类型不正确";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
